package applications.studentApplicationForm.ui.lib;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import org.objectweb.fractal.fraclet.annotations.Component;
import org.objectweb.fractal.fraclet.annotations.Interface;
import org.objectweb.fractal.fraclet.annotations.Requires;

@Component(provides = {@Interface(name = "jPanelItf", signature = org.objectweb.fractal.swing.JPanelItf.class), @Interface(name = "jPanelAttributes", signature = org.objectweb.fractal.swing.JPanelAttributes.class), @Interface(name = "uicontainerservice", signature = ontocompo.api.UIContainerService.class), @Interface(name = "ontocompointrospection", signature = ontocompo.api.OntoCompoIntrospection.class)})


public class StudentApplicationFormStudentChoicePanel extends JPanel implements  org.objectweb.fractal.swing.JPanelItf, org.objectweb.fractal.swing.JPanelAttributes, ontocompo.api.UIContainerService, ontocompo.api.OntoCompoIntrospection {

	private String uid;
	private org.objectweb.fractal.api.Component c;
	
	@Requires(name = "studentapplicationformstudentpersonaldatabutton")
	private ontocompo.api.UIContainerService studentapplicationformstudentpersonaldatabutton;
	
	@Requires(name = "studentapplicationformstudentadressbutton")
	private ontocompo.api.UIContainerService studentapplicationformstudentadressbutton;
	
	@Requires(name = "studentapplicationformstudentacademicrecordbutton")
	private ontocompo.api.UIContainerService studentapplicationformstudentacademicrecordbutton;
	
	private JTabbedPane tabbedPane;
	
	
	
	public StudentApplicationFormStudentChoicePanel() {
		super();
		this.uid = "applications.studentApplicationForm.ui.lib.StudentApplicationFormStudentChoicePanel";
		System.out.println(this.toString() + "   created!");
		

	}
	
	@Override
	public void init() {
		// TODO Auto-generated method stub
		this.studentapplicationformstudentpersonaldatabutton.init();
		this.studentapplicationformstudentadressbutton.init();
		this.studentapplicationformstudentacademicrecordbutton.init();
		
		tabbedPane = new JTabbedPane();

		tabbedPane.addTab("Personal Data", this.studentapplicationformstudentpersonaldatabutton.getComponentItSelf());
		tabbedPane.addTab("Address",  this.studentapplicationformstudentadressbutton.getComponentItSelf());
		tabbedPane.addTab("Academic Record",  this.studentapplicationformstudentacademicrecordbutton.getComponentItSelf());

		this.add(tabbedPane, BorderLayout.CENTER);
		
		this.setBackground(Color.white);
		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
		
		this.add(Box.createHorizontalGlue());
		
	}
	
	
	

	@Override
	public JComponent getComponentItSelf() {
		// TODO Auto-generated method stub
		return this;
	}

	@Override
	public void update(Object arg0) {
		// TODO Auto-generated method stub
				
	}

	public String toString() {
		return "StudentApplicationFormStudentChoicePanel";
	}
	

	@Override
	public org.objectweb.fractal.api.Component getFractalComponent() {
		// TODO Auto-generated method stub
		return this.c;
	}

	@Override
	public String getUid() {
		// TODO Auto-generated method stub
		return this.uid;
	}

	@Override
	public void setFractalComponent(org.objectweb.fractal.api.Component c) {
		// TODO Auto-generated method stub
		this.c = c;
	}

	@Override
	public void setUid(String uid) {
		// TODO Auto-generated method stub
		this.uid = uid;
	}
	
	

}
